package com.sunlee.common.service.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.sunlee.common.core.entity.BaseEntity;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户行为表
 *
 * @TableName tb_user_action
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "tb_user_action")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UserActionEntity extends BaseEntity implements Serializable {

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 商品ID
     */
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 类型（1：下载 2浏览 3收藏）
     */
    @TableField(value = "action_type")
    private Integer actionType;

    /**
     * 状态（0：无效 1：有效）
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    private Date createDate;

    /**
     * 创建时间
     */
    @TableField(value = "update_date", fill = FieldFill.INSERT_UPDATE)
    private Date updateDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}